import request from '@/utils/request'

// 查询用户管理列表
export function listTbUser(query) {
  return request({
    url: '/gene-face/tbUser/list', method: 'get', params: query
  })
}

// 查询用户管理详细
export function getTbUser(id) {
  return request({
    url: '/gene-face/tbUser/' + id, method: 'get'
  })
}

// 新增用户管理
export function addTbUser(data) {
  return request({
    url: '/gene-face/tbUser', method: 'post', data: data
  })
}

// 修改用户管理
export function updateTbUser(data) {
  return request({
    url: '/gene-face/tbUser', method: 'put', data: data
  })
}

// 删除用户管理
export function delTbUser(id) {
  return request({
    url: '/gene-face/tbUser/' + id, method: 'delete'
  })
}

// 导出用户管理
export function exportTbUser(query) {
  return request({
    url: '/gene-face/tbUser/export', method: 'get', params: query
  })
}

export function selectUserName() {
  return request({
    url: '/gene-face/tbUser/selectTbUser', method: 'get'
  })
}

// 用户密码重置
export function resetTbUserPwd(id, userName, password) {
  const data = {
    id, userName, password
  }
  return request({
    url: '/gene-face/tbUser/resetPwd', method: 'put', data: data
  })
}
